package com.walter.learn.UseThread.ThreadDemo_readTest;

import com.walter.learn.ReadAndWrite.Read;
import com.walter.learn.ReadAndWrite.Write;
import org.junit.Test;
import org.slf4j.Logger;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * @ProjectName: learnOwner
 * @Package: com.walter.learn.UseThread.ThreadDemo_readTest
 * @ClassName: Common
 * @Description: java类作用描述
 * @Author: 唐朝
 * @CreateDate: 2019/2/19 10:35
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/2/19 10:35
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class Common {
    List<String> list = new ArrayList();

    public synchronized void read() {
        list = Read.readByInputStreamReader("G:\\TestData\\threadRead.txt");
    }

    public synchronized void tranform() {
        for (int i = 0; i < list.size(); i++) {
            Write.writeByFileOutputStream(list.get(i).toLowerCase() + "\r\n", "G:\\TestData\\threadDemo.txt");
        }
    }
}
